const account = {
    state: {
        acc_id: 0,
        acc_username: "",
        acc_password: "",
        acc_type: -1
    },
    getters: {
        getId(state) {
            return state.acc_id
        },
        getUsername(state) {
            return state.acc_username;
        },
        getPassword(state) {
            return state.acc_password;
        },
        getType(state) {
            return state.acc_type;
        }
    },
    mutations: {
        saveAccount(state, account) {
            state.acc_id = account.accId
            state.acc_username = account.accUsername
            state.acc_password = account.accPassword
            state.acc_type = account.accType
        },
        clearAccount(state) {
            state.acc_id = 0
            state.acc_username = ""
            state.acc_password = ""
            state.acc_type = -1
        }
    },
    actions: {}
}
export default account